package cn.school.controller;


import cn.school.pojo.ExamSession;
import cn.school.service.ExamSessionService;
import cn.school.vo.ResultVo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

@RestController
@RequestMapping("/examSession")
public class ExamSessionController {
    @Resource
    private ExamSessionService examSessionService;
    @RequestMapping("/addExamSession")
    public String addExamSession(String examSessionName, HttpServletRequest request){
        String message = examSessionService.addExamSession(examSessionName,request);
        return message;
    }
    @RequestMapping("/deleteExamSession")
    public String deleteExamSession(Integer examSessionId, HttpServletRequest request){
        String message = examSessionService.deleteExamSession(examSessionId,request);
        return message;
    }
    @RequestMapping("findExamSessionList")
    public ResultVo findExamSessionList(){
        ResultVo resultVo=examSessionService.findExamSessionList();
        return resultVo;
    }
}
